package com.robot.system.domain.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Description:TODO
 * @author:qzg
 * @Date:2021-01-11 16:42
 */
@Data
@Component
@PropertySource("classpath:application-druid.yml") //指定yml文件位置
@ConfigurationProperties(prefix = "spring.application")
public class portTest {

    @Value("${name}")
    String name;

    public static void main(String[] args) {
        portTest p = new portTest();
        System.out.println(p.getName());
    }
}
